#include"Sever.hpp"

int main()
{
    Buffer b;
    b.WriteAndPush("abc",3);
    std::string str;
    str = b.ReadAsStringAndPop(3);
    std::cout<<str<<std::endl;
    std::string str2("hello");
    str.clear();
    b.WriteAsStringAndPush(str2);
    std::cout<<str2.size()<<std::endl;
    str = b.ReadAsString(str2.size());
    std::cout<<str<<std::endl;
    
    Buffer c;
    c.WriteAsBufferAndPush(b);
    str.clear();
    str = c.ReadAsStringAndPop(str2.size());
    std::cout<<str<<std::endl;
    std::cout<<c.ReadAbleSize()<<std::endl;
    
    return 0;
}

